import { SAVR_USER_INFO, DELETE_USER_INFO } from '../action_types'
import { SPRemove,SPGet,SPSet } from '../../config'

export const createSaveUserInfoAction = (value) => {
    SPSet('meshList', JSON.stringify(value.meshList))
    SPSet("token", value.token)
    SPSet('isLogin', true)
    SPSet('email', value.email)
    SPSet('useName', value.useName)
    return { type: SAVR_USER_INFO, date: value }

}
//退出需要的redux
export const createDeletUserInfoAction = () => {
    SPRemove('meshList')
    SPRemove("token")
    return { type: DELETE_USER_INFO }

}